home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 …ember: Reference Library / Apple Developer Reference Library (December 1999) (Disk 1).iso / mac / Technical Documentation / Develop / develop Issue 24 / develop Issue 24 code / Scriptable Database 1.0a15.sea / Scriptable Database 1.0a15 / Foundation / GenericSearchSpec.h / GenericSearchSpec.h
Encoding:
C/C++ Source or Header  |  1996-02-20  |  1.8 KB  |  68 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        GenericSearchSpec.h
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Written by:    Andy Nicholas, Greg Anderson, Tom Conrad, Chris Bingham, Georgiann Puckett, John Thompson-Rohrlich
  7.  
  8.     Copyright:    © 1994-1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.          <5>     9/18/95    ga        
  11.  
  12. */
  13.  
  14.  
  15. #ifndef GenericSearchSpec_h
  16. #define GenericSearchSpec_h
  17.  
  18. //
  19. // AbstractSearchSpec.h is needed because
  20. // TAbstractSearchSpec is the base class of TGenericSearchSpec
  21. //
  22. #include "AbstractSearchSpec.h"
  23.  
  24. class TComparisonOperand;
  25.  
  26. //========================================================================================
  27. //
  28. //    CLASS TGenericSearchSpec
  29. //
  30. //========================================================================================
  31.  
  32. class TGenericSearchSpec : public TAbstractSearchSpec
  33.     {
  34. protected:
  35.     DescType                            fComparisonOperator;
  36.     TComparisonOperand*                    fOperand1;
  37.     TComparisonOperand*                    fOperand2;
  38.     
  39.     //
  40.     // --- Methods -------------------------------------------------------------------------------------
  41.     //
  42. public:
  43.     DeclareSmallClassData(TGenericSearchSpec, TAbstractSearchSpec);
  44.  
  45.     TGenericSearchSpec(DescType comparisonOp, TComparisonOperand* operand1, TComparisonOperand* operand2) :
  46.         fComparisonOperator(comparisonOp),
  47.         fOperand1(operand1),
  48.         fOperand2(operand2) {};
  49.     
  50.     virtual                                ~TGenericSearchSpec();
  51.     
  52.     // Methods relating to the use of the search specification
  53.     
  54.     virtual DescType                    SpecificationOperator();
  55.     virtual TComparisonOperand*            GetRightHandComparisonOperand();
  56.     virtual TComparisonOperand*            GetLeftHandComparisonOperand();
  57.         
  58.  
  59.     virtual Boolean                        Compare(const TAETransaction& t, TAbstractScriptableObject* itemToTest);
  60.     
  61.     // Methods relating to creating object specifiers for this search specification
  62.     
  63.     virtual TDescriptor                    BuildWhoseTest();        
  64.     };
  65.  
  66.  
  67. #endif
  68.